from libnmap.parser import NmapParser
import torch
from torch_geometric.data import Data

RISK_PORT = ['20', '21', '22', '23', '25', '111', '2049', '135', '137', '139', '445', '161', '389', '512', '513', '514',
             '873', '1194', '1352', '1433', '1521', '2181', '3128', '2601', '2604', '3306', '3389', '3690', '4848',
             '5000', '5432', '5900', '5901', '5902', '5984', '6379', '7001', '7002', '8069', '8080', '8081', '8082',
             '8083', '8084', '8085', '8086', '8087', '8088', '8089', '9080', '9081', '9090', '9200', '9300', '11211',
             '27017', '27018', '50070', '50030']

class DataProcess:
    def __init__(self,datafile):
        self.datafile = datafile
        self.RISK_PORT = RISK_PORT
        self.process()

    def process(self):
        scan = NmapParser.parse_fromfile(self.datafile)
        for host in scan:
            pass




